<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title>Dojox Calendar Test</title>
		<style type="text/css">
			@import "../../../dojo/resources/dojo.css";
			@import "../../../dijit/themes/tundra/tundra.css";
			@import "../../../dijit/themes/dijit.css";
			@import "../../../dijit/tests/css/dijitTests.css";
			@import "../Calendar/Calendar.css";

			.title {
				font-weight: bolder;
			}
		</style>

		<script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug:true, parseOnLoad: true"></script>

		<script type="text/javascript" src="../../../dijit/tests/_testCommon.js"></script>

		<script type="text/javascript" src="../../../dijit/dijit.js"></script>
		<script type="text/javascript" src="../../../dijit/_Calendar.js"></script>
		<script type="text/javascript" src="../FisheyeLite.js"></script>
		<script type="text/javascript" src="../../fx/_base.js"></script>
		<script type="text/javascript" src="../Calendar.js"></script>
		<script type="text/javascript">
			dojo.require("dojo.parser");	// scan page for widgets and instantiate them
			dojo.require("dojox.fx");
			dojo.require("dojox.widget.CalendarFx");

			dojo.declare(
				"test.CalendarCustomFx",
			 	[dojox.widget.Calendar], {

				addFx: function(query, fromNode){
					dojo.query(query, fromNode).onmouseover(function(evt){
						dojox.fx.highlight({node: evt.target}).play();
					});
				}
			});
			function log(str){
					dojo.byId("report").innerHTML = str;
				}

		</script>
	</head>
	<body>
		<div>
			Use different theme:
			<a href="test_Calendar.html?theme=tundra">tundra</a>
			<a href="test_Calendar.html?theme=soria">soria</a>
			<a href="test_Calendar.html?theme=nihilo">nihilo</a>
		</div>
		<div id="report" style="float:left; width:100%;height:40px;color:red;font-weight:bold;"></div>

		<div>
			<span style="width:33%;float:left;">
				<div class="title">Typical Calendar usage, with day, and month/year views</div>
				<div dojoType="dojox.widget.Calendar" id="cal">
					<script type="dojo/connect" event="onValueSelected" args="value">
						log("Date Value selected: " + value);
					</script>
				</div>

				<p>
				Lorem ipsum dolor sit amet, <a href="#">consectetuer</a> adipiscing elit. Aenean
				semper sagittis velit. Cras in mi. Duis porta mauris ut ligula.
				Proin porta rutrum lacus. <a href="#">Etiam</a> consequat scelerisque quam. Nulla
				facilisi.  Maecenas luctus venenatis nulla. In sit amet dui non mi
				semper iaculis.  Sed molestie tortor at ipsum. <a href="#">Morbi</a> dictum rutrum
				magna. Sed vitae risus.
				</p>
			</span>

			<span style="width:33%;float:left;">
				<div class="title">With day only view, no month/year view</div>

				<div dojoType="dojox.widget.DailyCalendar" id="calDayOnly">
					<script type="dojo/connect" event="onValueSelected" args="value">
						log("Day Value selected: " + value);
					</script>
				</div>

				<p>
				Lorem ipsum dolor sit amet, <a href="#">consectetuer</a> adipiscing elit. Aenean
				semper sagittis velit. Cras in mi. Duis porta mauris ut ligula.
				Proin porta rutrum lacus. <a href="#">Etiam</a> consequat scelerisque quam. Nulla
				facilisi.  Maecenas luctus venenatis nulla. In sit amet dui non mi
				semper iaculis.  Sed molestie tortor at ipsum. <a href="#">Morbi</a> dictum rutrum
				magna. Sed vitae risus.
				</p>
			</span>
			<span style="width:33%;float:left;">
				<div class="title">With day only view, no month/year view</div>

				<div dojoType="dojox.widget.MonthAndYearlyCalendar" id="calMonthAndYearOnly">
					<script type="dojo/connect" event="onValueSelected" args="value">
						log("Date Value selected from Month and Year Only Calendar: " + value);
					</script>
				</div>

				<p>
				Lorem ipsum dolor sit amet, <a href="#">consectetuer</a> adipiscing elit. Aenean
				semper sagittis velit. Cras in mi. Duis porta mauris ut ligula.
				Proin porta rutrum lacus. <a href="#">Etiam</a> consequat scelerisque quam. Nulla
				facilisi.  Maecenas luctus venenatis nulla. In sit amet dui non mi
				semper iaculis.  Sed molestie tortor at ipsum. <a href="#">Morbi</a> dictum rutrum
				magna. Sed vitae risus.
				</p>
			</span>
		</div>

    <div>
			<span style="width:33%;float:left;">
				<div class="title">Typical calendar, with min/max constraints = {min:'2008-12-12',max:'2009-01-15'}</div>
				<div dojoType="dojox.widget.Calendar" id="calLimits" value="2008-12-25"
						constraints="{min:'2008-12-12',max:'2009-01-15'}">
					<script type="dojo/connect" event="onValueSelected" args="value">
						log("Date Value selected: " + value);
					</script>
				</div>

				<p>
				Lorem ipsum dolor sit amet, <a href="#">consectetuer</a> adipiscing elit. Aenean
				semper sagittis velit. Cras in mi. Duis porta mauris ut ligula.
				Proin porta rutrum lacus. <a href="#">Etiam</a> consequat scelerisque quam. Nulla
				facilisi.  Maecenas luctus venenatis nulla. In sit amet dui non mi
				semper iaculis.  Sed molestie tortor at ipsum. <a href="#">Morbi</a> dictum rutrum
				magna. Sed vitae risus.
				</p>
			</span>
			<span style="width:33%;float:left;">
				<div class="title">Typical calendar, with min/max constraints a week before and after the current date</div>
				<div dojoType="dojox.widget.Calendar" id="calLimitsWeek">
					<script type="dojo/method" event="postMixInProperties">						
						// This runs after the constructor, before properties are mixed in
						var currentDate = new Date();
						this.constraints = {
						  min: dojo.date.add(currentDate, 'week', -1),
							max: dojo.date.add(currentDate, 'week', +1)
						};
						dojox.widget.Calendar.prototype.postMixInProperties.call(this);
					</script>
					<script type="dojo/connect" event="onValueSelected" args="value">
						log("Date Value selected: " + value);
					</script>
				</div>

				<p>
				Lorem ipsum dolor sit amet, <a href="#">consectetuer</a> adipiscing elit. Aenean
				semper sagittis velit. Cras in mi. Duis porta mauris ut ligula.
				Proin porta rutrum lacus. <a href="#">Etiam</a> consequat scelerisque quam. Nulla
				facilisi.  Maecenas luctus venenatis nulla. In sit amet dui non mi
				semper iaculis.  Sed molestie tortor at ipsum. <a href="#">Morbi</a> dictum rutrum
				magna. Sed vitae risus.
				</p>
			</span>
			<span style="width:33%;float:left;">
				<div class="title">Typical calendar, initial date set in HTML to December 25th, 2007</div>
				<div dojoType="dojox.widget.Calendar" id="calXmas" value="2007-12-25">
					<script type="dojo/connect" event="onValueSelected" args="value">
						log("Date Value selected: " + value);
					</script>
				</div>

				<p>
				Lorem ipsum dolor sit amet, <a href="#">consectetuer</a> adipiscing elit. Aenean
				semper sagittis velit. Cras in mi. Duis porta mauris ut ligula.
				Proin porta rutrum lacus. <a href="#">Etiam</a> consequat scelerisque quam. Nulla
				facilisi.  Maecenas luctus venenatis nulla. In sit amet dui non mi
				semper iaculis.  Sed molestie tortor at ipsum. <a href="#">Morbi</a> dictum rutrum
				magna. Sed vitae risus.
				</p>
			</span>
	 </div>

		<div>
			<span style="width:50%;float:left;">
				<div class="title">Standard calendar, with FisheyeLite effects (in development, just here to show that FX can be applied)</div>

				<div dojoType="dojox.widget.CalendarFisheye" id="calFisheye">
					<script type="dojo/connect" event="onValueSelected" args="value">
						log("Date Value selected from Fisheye Calendar: " + value);
					</script>
				</div>

				<p>
				Lorem ipsum dolor sit amet, <a href="#">consectetuer</a> adipiscing elit. Aenean
				semper sagittis velit. Cras in mi. Duis porta mauris ut ligula.
				Proin porta rutrum lacus. <a href="#">Etiam</a> consequat scelerisque quam. Nulla
				facilisi.  Maecenas luctus venenatis nulla. In sit amet dui non mi
				semper iaculis.  Sed molestie tortor at ipsum. <a href="#">Morbi</a> dictum rutrum
				magna. Sed vitae risus.
				</p>
			</span>
			<span style="width:50%;float:left;">
				<div class="title">With custom Highlighting effects (in development, just here to show that FX can be applied)</div>

				<div dojoType="test.CalendarCustomFx" id="calCustomFx">
					<script type="dojo/connect" event="onValueSelected" args="value">
						log("Date Value selected in FX Calendar: " + value);
					</script>
				</div><p>
				Lorem ipsum dolor sit amet, <a href="#">consectetuer</a> adipiscing elit. Aenean
				semper sagittis velit. Cras in mi. Duis porta mauris ut ligula.
				Proin porta rutrum lacus. <a href="#">Etiam</a> consequat scelerisque quam. Nulla
				facilisi.  Maecenas luctus venenatis nulla. In sit amet dui non mi
				semper iaculis.  Sed molestie tortor at ipsum. <a href="#">Morbi</a> dictum rutrum
				magna. Sed vitae risus.
				</p>
			</span>
		</div>


	</body>
</html>
